import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import qiankun from "vite-plugin-qiankun";
const { name } = require("./package.json")
const { vueApp } = require("../config.js")
console.log(vueApp);
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => ({
  base: mode === "development" ? "/" : vueApp,
  plugins: [
    vue(),
    qiankun(name, {
      useDevMode: true,
    })
  ],
  server: {
    port: 2001
  },
  build: {
    outDir: "../../dist/vueApp",
    emptyOutDir: true,
  },
}))
